<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>{{ site.title }}</title>
    {{include 'components/import'}}
    <link rel="stylesheet" href="/stylesheets/defaultstyle.css">

</head>

<body>
    <!-- {{include 'components/site-nav'}} -->
    {{include 'components/header'}}

    {{ if info.infoType == 'SeekLease' }}
        {{include 'detail/detail2'}}
    {{ else }}
        {{include 'detail/detail'}}
    {{ /if }}

    {{include 'components/footer'}}
    <!-- {{ info }} -->
    <script src="/javascripts/vendor.js"></script>
    <script src="/javascripts/detail.js"></script>
    <script>
    function viewMessage(){
        var pid = '{{@ info._id}}';
        $.ajax({
            type: "put",
            contentType: "application/json",
            url: SITE_ADDR + "/info/"+pid+"/view",
            success: function (data, textStatus) {
                // if (data.result.ok) {
                //     bootbox.alert('收藏成功');
                // }
                // else {
                //     bootbox.alert('抱歉服务器出问题啦');
                // }
            },
            complete: function (XMLHttpRequest, textStatus) {
                submiting = false;
            }
        });
    }
    viewMessage();
    </script>
</body>

</html>
